package chapter05.Example1;

public class Example1 {
    public static void main (String[] args)throws Exception{
        String name = "米线";
        String str1 = new String();
        String str2 =new String("abcd");
        char[] charArray = new char[] {'D','E','F'};
        String str3 = new String(charArray);// "DEF"
        byte[] arr = {97,98,99};
        String str4 = new String(arr);//"abc"
        System.out.println("str1 = "+ str1);
        System.out.println("str2 = "+ str2);
        System.out.println("str3 = "+ str3);
        System.out.println("str4 = "+ str4);
    }
}
